package com.wsu.search.dingshiqi;

import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class GetXml {

  public GetXml() throws SQLException {

  }

//执行
  public void upOutJsp() {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm:ss");
    SimpleDateFormat formatter2 = new SimpleDateFormat("E");
    String now = formatter.format(cal.getTime());
    String week = formatter2.format(cal.getTime());
    int wk = 0;
    Date nowdate = new Date();
    int hh = 0;
    hh = nowdate.getHours();

    //GetUrl gg = new GetUrl();

    String url = "http://127.0.0.1/test.jsp";
   

    if (week.equals("星期六") || week.equals("星期日")) {
      wk = 1;
    }

    try {
      //gg.getHtml(url);
      
      System.out.println("执行时间:" + now);

    }
    catch (Exception e) {
      System.out.println("数据更新失败 :" + e);
      //e.printStackTrace();
    }

  }

  //执行
  public void upZtJsp() {


    try {
     
    }
    catch (Exception e) {
      
    }

  }

  /*
   public static void main(String[] args) throws SQLException {
     GetXml gx = new GetXml();
     gx.upOutJsp();
    System.out.println("main");

    }
   */

}
